import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    showPopup:false,
    showList:false,
    keyword:"",
    goodsList: []
  },
  mutations: {
    changeShowPopup(state,payload){
      state.showPopup = null;
      state.showPopup = payload;
    },
    changeShowList(state, payload) {
      state.showList = payload;
    },
    // changeKeyword(state, payload) {
    //   state.keyword = payload;
    // },
    changeGoodsList(state, payload) {
      state.goodsList = payload;
    },
    Search(state,data){
      state.goodsList = null;
      state.goodsList = data;
      state.showList=true;
    }

  },
  actions: {
  },
  modules: {
  }
})
